package com.ctbri.util;

import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import com.ctbri.concurrency.DaemonThreadFactory;

public class DaemonThreadPoolExecutor 
	extends ThreadPoolExecutor {
	public DaemonThreadPoolExecutor() {
		
		super(0, 					//corePoolSize
			  Integer.MAX_VALUE, 	//maximumPoolSize
			  60L, 					//keepAliveTime
			  TimeUnit.SECONDS, 	//TimeUnit
			  new SynchronousQueue<Runnable>(), //workQueue 
			  new DaemonThreadFactory()			//ThreadFactory
		);
	}
}
